{extend name="main/index" /}

{block name="main"}
<div class="main-content">
    <div class="breadcrumbs" id="breadcrumbs">
    <script type="text/javascript">
    try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
    </script>

    <ul class="breadcrumb">
        <i class="icon-home home-icon"></i>
        <li class="active">分配节点</li>
    </ul><!-- .breadcrumb -->

    <div class="nav-search" id="nav-search">
    <form class="form-search">
        <span class="input-icon">
            <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
            <i class="icon-search nav-search-icon"></i>
        </span>
    </form>
    </div><!-- #nav-search -->
    </div>

    <div class="page-content">
        <h3 class="header smaller lighter blue">分配节点</h3>
        <div class="row">
            <div class="col-xs-12">
                <hr>
                给 <b>{$role['name']}</b> 分配
                <hr>
                <form action="{:url('admin/role/savenode')}" method='post'>
                <div style="margin-bottom: 20px;">
                <div id="ck">
                {volist name="nodes" id="v"}
                    <input type="checkbox" name="node[]" class="mybox"  value="{$v['id']}" 
                    <?php if (in_array($v['id'],$ro_node) == true): ?>
                        checked
                    <?php endif; ?>
                    >{$v.name}
                    &nbsp;&nbsp;
                    <?php if ($i%4 == 0): ?>
                        <br><hr>
                    <?php endif; ?>
                {/volist}
                <hr>
                <input type="checkbox" onclick="ck(1)">全选========
                <input type="checkbox" onclick="ck(2)">全取消========
                <input type="checkbox" onclick="ck(3)">反选　
                </div>
                </div>
                <input type="hidden" name="rid" value="{$role['id']}">
                <input type="submit" value="保存" class="btn btn-primary">
                </form>
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div>
</div>
{/block}


{block name="myjs"}
{js href="/static/admin/assets/js/chosse.js"}
{/block}





